package string;

public class IndexOfDemo {
    public static void main(String[] args) {
        String s="wannging dhahah jkdal;j";
        int i=s.indexOf("i");
        System.out.println(i);
        i=s.indexOf("n",1);
        System.out.println(i);
        i=s.indexOf(";",7);
        System.out.println(i);
        i=s.indexOf("g",5);
        System.out.println(i);
        i=s.lastIndexOf("a");
        System.out.println(i);
        i=s.indexOf("dasd");
        System.out.println(i);
    }
}
